package com.itheima;

import com.itheima.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import java.awt.print.Book;

public class App {
    public static void main(String[] args) {
        //加载类路径
        ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
        //从文件系统加载文件
//        FileSystemXmlApplicationContext fileSystemXmlApplicationContext = new FileSystemXmlApplicationContext("D:\\IdeaProjects\\springstudy\\spring_10_container\\src\\main\\resources\\applicationContext.xml");
        BookDao bookDao = (BookDao) context.getBean("bookDao");
        bookDao.save();
    }
}
